import request from "@/until/axios";
import metro from "./metro";
export const metroswipe = () =>
    request({
        method: "get",
        url: metro.metro.metroswipe,
    });
export const opinionsearch = (params) =>
    request({
        method: "get",
        url: metro.metro.opinionsearch,
        params,
        headers: {
            "Authorization": window.localStorage.getItem("token")
        }
    });
export const opinionadd = (data) =>
    request({
        method: "post",
        url: metro.metro.opinionadd,
        data,
        headers: {
            "Authorization": window.localStorage.getItem("token")
        }
    });
export const opinionget = (params) =>
    request({
        method: "get",
        url: metro.metro.opinionget + "/" + params.id,
        params,
        headers: {
            "Authorization": window.localStorage.getItem("token")
        }
    });
export const infoget = () =>
    request({
        method: "get",
        url: metro.metro.infoget,
        headers: {
            "Authorization": window.localStorage.getItem("token")
        }
    });
export const infolist = (params) =>
    request({
        method: "get",
        url: metro.metro.infolist,
        params,
        headers: {
            "Authorization": window.localStorage.getItem("token")
        }
    });
export const cardget = (params) =>
    request({
        method: "get",
        url: metro.metro.cardget,
        params,
        headers: {
            "Authorization": window.localStorage.getItem("token")
        }
    });
export const cardadd = (data) =>
    request({
        method: "post",
        url: metro.metro.cardadd,
        data,
        headers: {
            "Authorization": window.localStorage.getItem("token")
        }
    });
export const carddel = (data) =>
    request({
        method: "delete",
        url: metro.metro.carddel + "/" + data.id,
        headers: {
            "Authorization": window.localStorage.getItem("token")
        }
    });
export const noticestatement = (params) =>
    request({
        method: "get",
        url: metro.metro.noticestatement + "?" + "type=" + params.type,
        headers: {
            "Authorization": window.localStorage.getItem("token")
        }
    });
export const noticelist = (params) =>
    request({
        method: "get",
        url: metro.metro.noticelist,
        params

    });
export const noticedetail = (params) =>
    request({
        method: "get",
        url: metro.metro.noticedetail + '/' + params.id,
        params
    });
export const foundget = (params) =>
    request({
        method: "get",
        url: metro.metro.foundget,
        params
    });
export const foundsearch = (params) =>
    request({
        method: "get",
        url: metro.metro.foundsearch + '/' + params.id,
        params
    })
export const linecity = () =>
    request({
        method: "get",
        url: metro.metro.linecity,
    })
export const linelist = () =>
    request({
        method: "get",
        url: metro.metro.linelist,
    })
export const linesearch = (params) =>
    request({
        method: "get",
        url: metro.metro.linesearch + '/' + params.id
    })

export const recorddata = () =>
    request({
        method: "get",
        url: metro.metro.recorddata,
        headers: {
            "Authorization": window.localStorage.getItem("token")
        }
    })
